<%@ page language="java"  pageEncoding="UTF-8"%>
<%@ include file="../include/taglib.jsp"%>
<%@ page import = "java.util.*" %>
<%@ page import = "com.sinodata.bsm.common.vo.Probe" %>
<%@ page import = "com.sinodata.bsm.common.constants.RelationConstants" %>
<%
response.setHeader("Cache-Control","no-store");
response.setHeader("Pragrma","no-cache");
response.setDateHeader("Expires",0);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <title>Tivoli资源集成向导</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta http-equiv="pragma" content="no-cache"/>
	<meta http-equiv="cache-control" content="no-cache"/>
	<meta http-equiv="expires" content="0"/>  
	<%@ include file="../include/common.jsp"%>
	<%@ include file="../include/jbox.jsp"%>
	
	
	 <link href="${pageContext.request.contextPath}/style/default/form/ui.tabs.css" type="text/css" rel="stylesheet" media="print, projection, screen"/>
 	 <link rel="stylesheet" type="text/css"
	      href="${pageContext.request.contextPath}/style/default/select/jquery.image.select.css" />
	 <script type="text/javascript"
	      src="${pageContext.request.contextPath}/js/select/jquery.image.select.min.js"></script>
	  
	  
	<style type="text/css"> 
		.basicMonitor,.applyMonitor{padding:5px;}
		.content{border:1px solid #dfe9f2;border-bottom:0px;width:24%;margin-right:5px;float:left;}
		.content h2{padding-left:5px;font-family:"microsoft yahei";font-size:12px; background:#eef2ff; border-bottom:1px solid #dfe9f2;text-align: center;height:25px;line-height:25px;vertical-align:middle;}
		.content  ul{width:100%;}
		.content  ul li{border-bottom:1px solid #dedede;padding-left:5px;height:25px;line-height:25px;vertical-align:middle;font-size:12px;}
		.content  ul li img{ border:0px;font-size:12px;}
		.content  ul li label{padding-left:10px;}
		.clear{clear:both;font:0px/0px Arial;height:0px;}
		a:link{color:#555;text-decoration:underline;}
	</style>
	<script type="text/javascript">
		$(document).ready(function(){
			
			$('.content label a').live('click',function(){
				
				var probeId = $('#probeId').find('option:selected').val();
				if(probeId == ''){
					getTopWin(window).getMessageBox().alert("请先选择probe","提示");
					return ;
				}
				
				var agreement = $(this).attr('type');
				if(agreement==null){
					var parent = $(this).parents('ul');
					agreement = parent.attr('type');
				}
				
				var probe = $('#probeId option:selected');
				if(probe == null || typeof probe == undefined||probe.attr('status')!=3){
				   //	return false;
				}
				var paRes = $("#parent").val();
				if(paRes==null||paRes==''){
					getTopWin(window).getMessageBox().alert("请先选择父资源","提示");
					return ;
				}
				
				location.assign("tivoli!input.action?id=${id}&viewId=${viewId}&resTypeId="+$(this).attr('idValue')+'&probid='+$('#probeId').find('option:selected').val()+'&agreement='+agreement);
			});
			
			$("#probeId").msDropDown().data("dd");
		});
	</script>
	
  </head>
  <body>
  	<ul class="ui-tabs-nav">
			<li ><a href="../resource/res!guide.action?id=${id}&viewId=${viewId}" style="text-decoration:none;"><span>新增单个资源</span></a></li> 
			<li class="ui-tabs-selected"><a href="#" style="text-decoration:none;"><span>集成TIVOLI资源</span></a></li>
			<li><a href="../integration/inmp!guide.action?id=${id}&viewId=${viewId}" style="text-decoration:none;"><span>集成朗易资源</span></a></li>
			<li><a href="../integration/inmpop!guide.action?id=${id}&viewId=${viewId}" style="text-decoration:none;"><span>集成ZOHO资源</span></a></li>
			<li><a href="../resource/res-type!resImport.action?resId=${id}&viewId=${viewId}" style="text-decoration:none;"><span>导入资源</span></a></li> 
	</ul> 
	<div class="ui-tabs-panel"/>
    <table class="table_eidt" id="restable" >
		<tbody>
	    	<tr>
	    		<td class="td_left" style="width:100px;">
					<span class="span_alert">*</span> 采集器
				</td>
	    		<td class="td_right">
	    			<div>
	    				<select id="probeId" name = "probeId"  class = "select" style="width:250px;">
	    				 <option value="" title=''>---- 请选择采集器 ----</option>
	    					<%
	    						List<Probe> probes = (List<Probe>)request.getAttribute("probeList");
	    						for(Probe  p : probes){
	    						    if(p.getStatus()==3){
	    			    				out.println("<option value='"+p.getId()+"' title='/bsm/style/default/bsm/images/proberun.png' >"+p.getId()+"_"+p.getName()+"</option>");
	    						    }else{
	  	    			    			out.println("<option value='"+p.getId()+"' title='/bsm/style/default/bsm/images/probestop.png' >"+p.getId()+"_"+p.getName()+"</option>");
	    						    }
	    						}
	    					%>
	    				</select>
	    			</div>
				</td>
	    	</tr>
		</tbody>
    </table>
  	<div style="clear: both;margin-top:10px;">
    </div>
    <div  id="basicMonitor" class="basicMonitor" >
    	<input  type="hidden" id = "parent" value="${id}"/>
  		<div  class="content">
   			<h2 >主机</h2>
    		<ul type="1" >
    			<li><img src="${pageContext.request.contextPath}/style/default/bsm/guide/Windows.gif" /><label><a href="#" idValue="2101010000000" type="2">Windows</a></label></li>
    			<li><img src="${pageContext.request.contextPath}/style/default/bsm/guide/icon_monitors_linux.gif" /><label><a href="#" idValue="2101030000000">Linux</a></label></li>
    			<li><img src="${pageContext.request.contextPath}/style/default/bsm/guide/sco unix.gif" /><label><a href="#" idValue="2101020000000">Unix</a></label></li>
    		</ul>
  		</div>
	   	<div  class="content" >
   			<h2 >数据库</h2>
    		<ul type="3">
    			<li><img src="${pageContext.request.contextPath}/style/default/bsm/guide/icon_monitors_db2.gif"  /><label><a href="#" idValue="2102020000000">DB2</a></label></li>
    			<li><img src="${pageContext.request.contextPath}/style/default/bsm/guide/icon_monitors_oracle.gif"  /><label><a href="#" idValue="2102010000000">Oracle</a></label></li>
    		</ul>
  		</div>	
  		<div  class="content" >
   			<h2 >网络设备</h2>
    		<ul type="3"> 
    			<li><img src="${pageContext.request.contextPath}/style/default/bsm/guide/icon_monitors_snmp.gif"  /><label><a href="#" idValue="2104120000000">网络设备</a></label></li>
    		</ul>
  		</div>
	   	<div  class="content" >
   			<h2 >其它</h2>
    		<ul type="3">
    			<li><img src="${pageContext.request.contextPath}/style/default/bsm/guide/icon_monitors_filesystem.gif"  /><label><a href="#" idValue="2105010000000">MQ</a></label></li>
    			<li><img src="${pageContext.request.contextPath}/style/default/bsm/guide/icon_monitors_filesystem.gif"  /><label ><a href="#" idValue="2105020000000">WAS</a></label></li>
    			<li><img src="${pageContext.request.contextPath}/style/default/bsm/guide/icon_monitors_filesystem.gif"  /><label ><a href="#" idValue="2105030000000">MB</a></label></li>
    			<li><img src="${pageContext.request.contextPath}/style/default/bsm/guide/icon_monitors_filesystem.gif"  /><label ><a href="#" idValue="2105040000000">TPC</a></label></li>
    		</ul>
  		</div>	
    </div>
  </body>
</html>
